package com.csusm.geo.science.tutor;

import java.util.ArrayList;

public class SlideShowDbhelper {
	@SuppressWarnings("rawtypes")
	public ArrayList getLinks(String selLoc) {
		ArrayList<String> path = null;
		String url ="http://ouyangdev.cs.csusm.edu/GeoTutor/getimage.php";
		//Get the data from database
		String result = UtilityHelper.getResult(selLoc, url);		     
		// paring data
		String[] rowsTemp;
		String rdelimiter = ":::::";
		// given string will be split by the argument delimiter provided.
		result = result.trim();
		rowsTemp = result.split(rdelimiter);
		// print substrings
		path = new ArrayList<String>();
		for (int i = 0; i < rowsTemp.length; i++) {
			System.out.println(rowsTemp[i]);
			path.add(rowsTemp[i]);
		}
		return path;
	}
}

